import React from 'react'

// 引入路由
import { BrowserRouter as Router, Route, Redirect} from 'react-router-dom'
import Home from './pages/Home/index'
import CityList from './pages/CityList/index'
import Map from './pages/Map/index'
function App() {
  return (
    <Router>
      <div className="App">
        <Route exact path="/" render={ () => <Redirect to="/home" /> }></Route>      
        {/* 配置的导航菜单 ，这个link 标签会自动去匹配 路由中的组件，然后显示不同的组件进行展示*/}
        
        {/* 配置路由 */}
        <Route path="/home" component={ Home }></Route>      
        <Route path="/citylist" component={ CityList }></Route>      
        <Route path="/map" component={ Map }></Route>      
      </div>
    </Router>
  );
}

export default App;
